home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Palettes
/
KeyDownBrowser
/
UsingKeyDownBrowser
/
KeyDownMatrix.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
1KB
|
47 lines
//---------------------------------------------------------------------------------------------------------
//
// KeyDownMatrix
//
// Inherits From: Matrix
//
// Declared In: KeyDownMatrix.h
//
// Disclaimer
//
// You may freely copy, distribute and reuse this software and its
// associated documentation. I disclaim any warranty of any kind,
// expressed or implied, as to its fitness for any particular use.
//
//---------------------------------------------------------------------------------------------------------
#import "KeyDownMatrix.h"
@implementation KeyDownMatrix
- mouseDown: (NXEvent*) theEvent
{
// Override to make KeyDownBrowser first responder (ascend view hierarchy -
// Matrix, ClipView, ScrollView, KeyDownBrowser). Making any of the subviews
// first responder would work, as the responder chain would eventually hit browser.
// Specifying the browser eliminates the unnecessary search.
if ([self isEnabled] == NO) return self;
[super mouseDown: theEvent];
[[self window] makeFirstResponder: [[superview superview] superview]];
return self;
}
- (int) numRows
{
return numRows;
}
- (int) numCols
{
return numCols;
}
@end